<#include "/WEB-INF/template/common/layout/l_admin.ftl"/>
<@adminLayout>
    <@breadcrumb view=breadcrumbView/>
<div class="row">
    <div class="col-md-12">
        <!-- BEGIN EXAMPLE TABLE PORTLET-->
        <div class="portlet box light-grey">
            <div class="portlet-title">
                <div class="caption"><i class="fa fa-globe"></i>${breadcrumbView.getCurmenu().name!}</div>
                <div class="actions">
                <#--<button id="list_add" class="btn blue" data-toggle="modal" href="#responsive">-->
                        <#--<i class="fa fa-plus-circle"></i>-->
                    <#--</button>-->
                </div>
            </div>
            <div class="portlet-body">
                <div class="table-toolbar">
                    <form action="${CONTEXT_PATH}/m/log/search" method="post">
                        <div class="row">
                            <div class="col-md-3">
                                <label class="control-label">客户选择</label>

                                <div class="input-group">
                                    <input type="text" class="form-control" name="username"
                                           value="${username!}">
                                    <input type="hidden" class="form-control" name="useruuid"
                                           value="${useruuid!}">
                                <span class="input-group-btn">
                                <#--order_create_list中已经引入[select_user] 控件 ,此处直接使用,
                                    回调函数定义在order_create_list中.
                                -->
                                    <a class="btn default" type="button" data-toggle="modal"
                                       href="#select_user">
                                        <i class="fa fa-male"></i></a>
                                </span>
                                </div>

                            </div>
                            <div class="col-md-3">
                                <label class="control-label">来源</label>

                                <div class="input-group">
                                    <select name="laiyuan">
                                        <option value="Android">Android</option>
                                        <option value="iPhone">ios</option>
                                        <option value="">pc</option>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <label class="control-label">&nbsp;</label>

                                <div class="input-group">
                                    <input type="submit" value="查询"/></div>
                            </div>

                            <div class="col-md-3"></div>
                        </div>
                    </form>
                </div>
                <#include "/WEB-INF/template/common/macro/paginate.ftl" />
                <@paginate
                currentPage=pageList.pageNumber
                totalPage=pageList.totalPage
                actionUrl="m/log/search/"
                urlParas=TB_URL_PARAM
                />
                <table class="table table-striped table-bordered table-hover" style="width:100%"
                       id="sample_1">
                    <thead>
                    <tr>
                        <th width="5%"></th>
                        <th width="10%">用户</th>
                        <th width="10%">来源</th>
                        <th width="10%">逻辑耗时</th>
                        <th width="10%">视图耗时</th>
                        <th width="10%">状态</th>
                        <th width="10%">请求路径</th>
                        <th width="10%">IP</th>
                        <th width="10%">访问日期</th>
                        <th width="10%">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <#list pageList.getList() as item>
                        <tr>
                            <td></td>
                            <td>${item.username}</td>
                            <td>
                                <#if item.useragent?index_of("Android")!=-1>
                                    Android
                                <#elseif item.useragent?index_of("iPhone")!=-1>
                                    iPhone
                                <#else >
                                    PC
                                </#if>
                            </td>
                            <td>
                                <#if (item.actionhaoshi <1000)>
                                    <span class="badge badge-roundless badge-success">${item.actionhaoshi}</span>
                                <#else >
                                    <span class="badge badge-roundless badge-important">${item.actionhaoshi}</span>
                                </#if>
                            </td>
                            <td>
                                <#if (item.viewhaoshi <1000)>
                                    <span class="badge badge-roundless badge-success">${item.viewhaoshi}</span>
                                <#else >
                                    <span class="badge badge-roundless badge-important">${item.viewhaoshi}</span>
                                </#if>
                            </td>
                            <td>${item.status}</td>
                            <td>${item.requestpath}</td>
                            <td>${item.ips}</td>
                            <td>${(item.createtime)?string("yyyy-MM-dd HH:mm:ss")}</td>
                            <td>
                            <#--<a href="javascript:;" onclick="update(this,'${item.id}')" class="btn btn-primary btn-xs">-->
                                    <#--<i class="fa fa-pencil update"></i>-->
                                <#--</a>-->
                                <#--<a href="javascript:;" onclick="deletebyid(this,'${item.id}')" class="btn btn-danger btn-xs">-->
                                    <#--<i class="fa fa-minus-circle"></i>-->
                                <#--</a>-->
                            </td>
                        </tr>
                        </#list>
                    </tbody>
                </table>
                <@paginate
                currentPage=pageList.pageNumber
                totalPage=pageList.totalPage
                actionUrl="m/log/search/"
                urlParas=TB_URL_PARAM
                />
            </div>
        </div>
        <!-- END EXAMPLE TABLE PORTLET-->
    </div>
    <!--model begin-->
<#--用户选择控件-->
    <@select_user/>
    <!--model end-->
</div>
    <@script>
    <script type="text/javascript">
        jQuery(document).ready(function () {
        });
        var Plugin_SelectUser = {
            callback: function (v) {
                alert(v);
            }
        };
    </script>
    </@script>

</@adminLayout>